﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="expires" content="-1" />
	<link rel="stylesheet" type="text/css" href="/site_media/css/style.css" />
	<script type="text/javascript" src="/site_media/js/script.js"></script>
	<title>Labmin - lista studentów</title>
</head>
<body>
	<div id="wrap">
		{% include "header.html" %}
		{% if request.session.user %}
			<div id="content-wrap">
				{% include "sidebar.html" %}
				<div id="main">
                
				<form name="form" action="" method="post" style="margin: 0px">
                <div class="box" style="padding: 10px;">
                    <input type="text" name="filter_login">
                    <input type="button" name="filter" value="Filtruj" onClick="document.form.action='/students_list'; document.form.submit();">
                </div>
				<div class="box" style="padding: 10px;">
					{% for student in students %}
						<div class="list_position">
							<div class="list_box">
								<input type="checkbox" name="list" value="{{ student.pk }}"/>
							</div>
							<div class="list_text">
								<a href="show_student/{{student.pk}}"><b>{{ student.login }}</b></a> ({{ student.email }})
							</div>
							<div class="list_text">
								<a href="student_form/{{ student.pk }}">Edytuj</a>
							</div>
						</div>
					{% endfor %}
					<div style="margin-top:10px;">
						<input type="button" onclick="checkAll()" value="Zaznacz wszystkich">
						<input type="button" onclick="uncheckAll()" value="Wyczyść zaznaczenie">
						<input type="button" onclick="invertAll()" value="Odwróć zaznaczenie">
					</div>
				</div>
				<div class="box" style="padding: 10px;">
					<input type="button" name="delete" value="Usuń" onClick="document.form.action='/delete_students'; document.form.submit();" />
					<input type="button" name="create_group" value="Twórz grupę" onClick="document.form.action='/student_group_form'; document.form.submit();" />
				</div>
				</form>
				</div>
			</div>
		{%endif%}
	</div>
	{% include "footer.html" %}
</body>
</html>
